package main

import "fmt"

func main() {

}

/**
 *	majorityElement
 *	@Description: 哈希表
 *	@param nums []int
 *	@return res []int
 */
func majorityElement(nums []int) (res []int) {
	m := make(map[int]int)
	n := len(nums)
	for _, num := range nums {
		m[num]++
	}
	fmt.Printf("%#v", m)
	count := n / 3
	for k, v := range m {
		if v > count {
			res = append(res, k)
		}
	}
	return
}
